﻿<UserControl x:Class="QLab.UserControls.SolutionExplorerView_old"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:model="clr-namespace:QLab.Model"
             xmlns:util="clr-namespace:QLab.Utility"
             xmlns:uc="clr-namespace:QLab.UserControls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <TreeView x:Name="navigationTree_old" ItemsSource="{Binding Tree}" SelectedItemChanged="navigationTree_SelectedItemChanged" KeyDown="NavigationTree_KeyDown" >
            <TreeView.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add _M File" Command="{Binding Path=AddFileCommand}" CommandParameter="{x:Static model:NavigationItemType.M_File}" />
                </ContextMenu>
            </TreeView.ContextMenu>
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate DataType="{x:Type model:ProjectItem}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding Image}" Width="16" Height="16" Margin="0 0 5 0" />
                        <uc:EditableTextBlock Text="{Binding Path=Text, Mode=TwoWay, NotifyOnSourceUpdated=True}" IsInEditMode="{Binding Path=IsInEditMode, Mode=TwoWay, NotifyOnSourceUpdated=True}" IsEditable="{Binding Path=Editable}" EditFinished="EditableTextBlock_EditFinished" EditCanceled="EditableTextBlock_EditCanceled" />
                    </StackPanel>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
            <TreeView.ItemContainerStyle>
                <Style TargetType="TreeViewItem">
                    <Setter Property="IsExpanded" Value="{Binding Expanded}" />
                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                    <EventSetter Event="TreeViewItem.MouseRightButtonDown" Handler="TreeViewItem_MouseRightButtonDown" />
                </Style>
            </TreeView.ItemContainerStyle>
        </TreeView>
    </DockPanel>
</UserControl>
